jQuery(function($) {
	// Create variables (in this scope) to hold the API and image size
	var jcrop_api, boundx, boundy;
	$('#target').Jcrop( {
		onChange : updatePreview,
		onSelect : updatePreview,
		aspectRatio : 1
	}, function() {
			// Use the API to get the real image size
			var bounds = this.getBounds();
			boundx = bounds[0];
			boundy = bounds[1];
			// Store the API in the jcrop_api variable
			jcrop_api = this;
		});
	function updatePreview(c) {
		if (parseInt(c.w) > 0) {
			var rx = 180 / c.w;
			var ry = 180 / c.h;
			$('#preview').css( {
				width : Math.round(rx * boundx) + 'px',
				height : Math.round(ry * boundy) + 'px',
				marginLeft : '-' + Math.round(rx * c.x) + 'px',
				marginTop : '-' + Math.round(ry * c.y) + 'px'
			});
		}
		//参数赋值
	    $('#x').val(c.x);  
	    $('#y').val(c.y);  
	    $('#w').val(c.w);  
	    $('#h').val(c.h); 
	    
	    $('#f').val($("img#target").attr("title"));
	};
});
//418:228
//549: